package main

import "fmt"

func main() {

	m := map[string]string{
		"name":"gxgeek",
		"course":"golang",
		"site":"imooc",
		"quality":"notbad",
	}

	m2 := make(map[string]int) //m2 == empty
	var m3 map[string]int// m3 ==nil
	fmt.Println(m,m2,m3)

	fmt.Println("Traversing  map")

	for k,v :=range m{
		fmt.Println(k,v)
	}

	fmt.Println(" Getting values")
	//courseName := m["course"]
	if courseName,ok := m["coursse"];ok{
		fmt.Println(courseName)
	}else {
		fmt.Println("key don't  exist ")
	}

	fmt.Println("deleteing values")
	name,ok := m["name"]
	fmt.Println(name,ok)
	delete(m,"name")
	name,ok = m["name"]
	fmt.Println(name,ok)

	//fmt.Println(courseName,ok)


}
